import request from '@/utils/request'

// 查询设施列表
export function listFacilities(query) {
  return request({
    url: '/facilities/facilities/list',
    method: 'get',
    params: query
  })
}

// 查询设施详细
export function getFacilities(facilitiesId) {
  return request({
    url: '/facilities/facilities/' + facilitiesId,
    method: 'get'
  })
}

// 新增设施
export function addFacilities(data) {
  return request({
    url: '/facilities/facilities',
    method: 'post',
    data: data
  })
}

// 修改设施
export function updateFacilities(data) {
  return request({
    url: '/facilities/facilities',
    method: 'put',
    data: data
  })
}

// 删除设施
export function delFacilities(facilitiesId) {
  return request({
    url: '/facilities/facilities/' + facilitiesId,
    method: 'delete'
  })
}
// 查询部门下拉树结构
export function deptTreeSelect() {
  return request({
    url: '/facilities/facilities/deptTree',
    method: 'get'
  })
}
